/// YApi QuickType插件生成，具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation

import 'dart:convert';

SystemConfigDomain systemConfigDomainFromJson(String str) => SystemConfigDomain.fromJson(json.decode(str));

String systemConfigDomainToJson(SystemConfigDomain data) => json.encode(data.toJson());

class SystemConfigDomain {
    SystemConfigDomain({
        this.id,
        required this.name,
        required this.intercomUrl,
        required this.serverUrl,
    });

    int? id;
    String name;
    String intercomUrl;
    String serverUrl;

    factory SystemConfigDomain.fromJson(Map<dynamic, dynamic> json) => SystemConfigDomain(
      id: json['id'],
        name: json["name"],
        intercomUrl: json["intercomUrl"],
        serverUrl: json["serverUrl"],
    );

    Map<dynamic, dynamic> toJson() => {
        "id": id,
        "name": name,
        "intercomUrl": intercomUrl,
        "serverUrl": serverUrl,
    };

    static String tableName = "system_config_domain";

    //建表语句
    static String createTableSql = '''
      CREATE TABLE If NOT EXISTS $tableName  (
        id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, 
        name    TEXT ,
        intercomUrl  TEXT,
        serverUrl   TEXT
      );
      ''';


    // 初始化数据
    static List<Map<String, dynamic>> initData = [
      {
        "name": "局域网测试环境",
        "intercomUrl": "192.168.1.22",
        "serverUrl": "http://192.168.1.23:36000",
      },
    ];
}
